<template>
    <div class="person">
        <h2>sum: {{ sum }}, 放大后: {{ bigSum }}</h2>
        <button @click="add">sum+1</button>
        <hr>
        <img v-for="(dog, index) in dogList" :src="dog" :key="index"> <br>
        <button @click="next">再来一只狗</button>
    </div>
</template>

<script lang="ts">
export default {
    name: 'Person',
}
</script>

<script setup lang="ts">
import useDog from '@/hooks/useDog';
import useSum from '@/hooks/useSum';
const { dogList, next } = useDog();
const { sum, bigSum, add } = useSum();
</script>

<style scoped>
.person {
    background-color: skyblue;
    box-shadow: 0 0 10px;
    border-radius: 10px;
    padding: 20px;
}

button {
    margin: 0 2px;
}

li {
    font-size: 15px;
}

img {
    height: 100px;
    margin: 5px;
}
</style>